<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script>
        var personStr = '{"name":"zhangsan","age":10,"dog":{"dName":"小航","color":"黑"}}'
        
        var person = JSON.parse(personStr);

        console.log(person.name);
        console.log(person.dog);

        console.log(JSON.stringify(person));

    </script>

</head>
<body>
    
</body>
</html>